package com.csl.jsonpreference.test

import com.csl.jsonpreference.bean.ConfigTYPE
import com.csl.jsonpreference.tag.Configurable


@Configurable(discribe = "串口配置")
class AquaLocalSerialConfig {

    @Configurable(discribe = "开启串口转发", type = ConfigTYPE.BOOLEAN, index = 0)
    var openSerial = false

    @Configurable(discribe = "波特率", type = ConfigTYPE.NUMBER, index = 1)
    var baud = 0

    @Configurable(discribe = "TX端口", type = ConfigTYPE.NUMBER, index = 2)
    var tx = 0

    @Configurable(discribe = "RX端口", type = ConfigTYPE.NUMBER, index = 3)
    var rx = 0

    @Configurable(discribe = "数据转换规则", type = ConfigTYPE.TXT, index = 4)
    var dataDecoder = ""


    override fun toString(): String {
        return "WifiDeviceSerialConfig(openSerial=$openSerial, baud=$baud, tx=$tx, rx=$rx, dataDecoder='$dataDecoder')"
    }


}